﻿using OfficeOpenXml;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace Acerno2
{
    public static class ExcelReader
    {
        public List<List<List<double>>> readMeasurements(string path)
        {
            List<List<List<double>>> result = new List<List<List<double>>>();

            FileInfo fileInfo = new FileInfo(path);
            if (!fileInfo.Exists)
            {
                throw new FileNotFoundException();
            }
            
            ExcelPackage file = new ExcelPackage(fileInfo);
            List<ExcelWorksheet> worksheets = file.Workbook.Worksheets.ToList();

            foreach (ExcelWorksheet worksheet in worksheets)
            {
                result.Add(processWorksheet(worksheet));
            }

            return result;
        }

        private List<List<double>> processWorksheet(ExcelWorksheet ws)
        {
            List<List<double>> result = new List<List<double>>();
            


            return result;
        }
    }
}
